<!DOCTYPE html>
<html >
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>开放平台管理系统</title>
    <link rel="stylesheet" href="layui/css/layui.css">
    <link rel="stylesheet" href="easyui/default/easyui.css">
    <script src="layui/jquery-1.10.2.min.js"
            type="text/javascript"></script>
    <script src="easyui/jquery.easyui.min.js"
            type="text/javascript"></script>
</head>
<body class="layui-layout-body">

<div  style="text-align: center">

        <div class="layui-inline">
            <table id="demo" lay-filter="test"></table>
        </div>


</div>


<script src="layui/layui.js"></script>
<script type="text/javascript" >

    layui.use('table', function(){
        var table = layui.table;

        //第一个实例
        table.render({
            elem: '#demo'
            ,height: 312
            ,url: '/emp/page' //数据接口
            ,page: true //开启分页
            ,cellMinWidth: 100
            ,cols: [[ //表头
                {field: 'eno', title: 'ID', width:80, sort: true, fixed: 'left'}
                ,{field: 'ename', title: '用户名', width:80}
                ,{field: 'esex', title: '性别', width:80, sort: true}
                ,{field: 'salary', title: '工资', width:80}
                ,{field: 'pwd', title: '密码', width: 177}
                ,{field: 'dno', title: '部门号', width: 80, sort: true}
                ,{field: 'shijian', title: '生日', width: 80, sort: true}

            ]]
        });

    });
</script>
</body>
</html>
